-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow shell integration scripts to request prompt click events #7847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Allow shell integration scripts to request prompt click events #7847
Conversation
This is done via the `prompt-click-events` keyword in `$KITTY_SHELL_INTEGRATION`. Also adds the `$KITTY_SUPPORTS_PROMPT_CLICK_EVENTS` environment variable, which scripts can use to check for support before requesting click events. Note that the fish integration script is intentionally not modified, as the fish integration seems to be built-in in newer versions.
|
IMO rather than adding this as a shell integration option, instead look for some shell global variable in the integration scripts and if it is set send click_events with the prompt marking. Then the user only has to configure click support in one place, his rc files, to load the click support code. That code in turn should set the shell global variable and the shell integration scripts should read the variable. |
|
The approach I took was based on this comment. My reading of that was that zsh themes / rc files should append to |
|
This is not a shell integration feature so much as a shell capability. |
|
I understand your reasoning, but I'm not sure what mechanism you're proposing. Checking zsh version for the future where zsh supports this natively is one thing. For the in-between times, though, where folks would need to use something like https://github.com/stephane-chazelas/misc-scripts/blob/master/mouse.zsh , how should the shell integration script be told that this patching has been done? Should there be a separate environment variable like |
|
User cources that script and sets a non exported env var or zsh global. |
dc27691 to
63df210
Compare
9b12877 to
da6f26d
Compare
This is done via the
prompt-click-eventskeyword in$KITTY_SHELL_INTEGRATION.Also adds the
$KITTY_SUPPORTS_PROMPT_CLICK_EVENTSenvironment variable, which scripts can use to check for support before requesting click events.Note that the fish integration script is intentionally not modified, as the fish integration seems to be built-in in newer versions.